<script type="text/javascript">
	function MailBoxComposeMessage()
	{
		// call the parent constructor ;
		this.constructor();

		this.sCurrentPage		= '__current_page__';
		this.sPageReceiver 		= this.sCurrentPage + '?ajax_mode=true'; 
		this.sErrorMessage 		= '__error_message__';
	}

	// inheritance ;
	MailBoxComposeMessage.prototype = MailBox.prototype;

	// add some function to the object ;

	/**
	 * @description : function will close the reply window ;
	 */

	MailBoxComposeMessage.prototype.cancelCompose = function()
	{
		window.location.href = this.sCurrentPage + '?mode=inbox';
	}

	MailBoxComposeMessage.prototype.AutoComplete = function()
	{
		var sPageUrl = this.sPageReceiver ;

		// get nicknames list ;
		$("#" + htmlSelectors[8]).autocomplete(sPageUrl + '&action=auto_complete', {
			width: 260,
			selectFirst: false
		});	

		// get member thumbnail ;
		$("#" + htmlSelectors[8]).result(function(event, data, formatted) {
			getHtmlData(htmlSelectors[9],  sPageUrl + '&action=get_thumbnail&recipient_id=' + data);
		});
	}

	// create the object;
	var oMailBoxComposeMessage = new MailBoxComposeMessage();
	
	$(document).ready(function () {
		oMailBoxComposeMessage.AutoComplete();
	});
</script>
<div class="view_message_container" id="compose_message_block">
	<table cellpadding="0" cellspacing="0" border="0" id="owner_information">
		<tr>
			<td valign="top" class="thumb_section">
				<div id="thumbnail_area">
					__member_thumbnail__
				</div>
			</td>
			<td valign="top" class="member_info">
				<div class="subject">
					<table cellpadding="1">
						<tr>
							<td>
								__message_to__
							</td>
							<td>
								<input type="text" id="message_recipient" value="__recipient_name__" class="ac_input"  tabindex="1"/>
							</td>
						</tr>
							<td>
								__subject__ :
							</td>
							<td>		
								<input type="text" id="compose_subject"/>
							</td>
						</tr>
					</table>
				</div>	
			</td>
		</tr>
	</table>
	<div class="message_container">
		<textarea id="compose_message" class="story_edit_area"></textarea>
	</div>
	<div class="message_actions">
		<div class="messages_options">
			<label><input type="checkbox" id="to_mail"/>__send_copy_to__</label>
			<br />
			<label><input type="checkbox" id="to_my_mail"/>__send_copy_my__</label>
			<br />
			<label><input type="checkbox" id="notify_mail"/>__notify__</label>
		</div>
        __compose_actions_buttons__
    </div>
</div>